-
-
Notifications
You must be signed in to change notification settings - Fork 8.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Extract evaluate splits from CPU hist. #7079
Conversation
The |
yes. It's not used now, gradients are set to zero instead. |
@ShvetsKS Thanks for the reply. Could you help review this PR? I will remove the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Two comments:
- It's nice that the CPU Hist is becoming more like GPU Hist. Consistency makes the whole codebase more legible.
- "Evaluator" is a nice abstraction. I like how we no longer need a mock for testing split evaluation.
LGTM |
Other than modularizing the split evaluation function, this PR also removes some more functions including
InitNewNodes
andBuildNodeStats
among some other unused variables. Also, scattered code like setting leaf weights is grouped into the split evaluator andNodeEntry
is simplified and made private. Another subtle difference with the original implementation is that the modified code doesn't calltree[nidx].Parent()
to traversal upward.perf
I think it's faster after the PR. URL is only run for 100 rounds, others are 500 rounds.